<template>
  <el-popconfirm title="确定删除吗？" @onConfirm="$emit('deleteItem')">
    <el-button
      slot="reference"
      type="danger"
      :size="size"
      style="width: 40px; margin-right: 5px"
      :disabled="disabled"
    >
      <i class="el-icon-delete" style="color: white" />
    </el-button>
  </el-popconfirm>
</template>

<script>
export default {
  name: "DeleteBtn",
  props: {
    disabled: {
      type: Boolean,
      default: false,
      required: false,
    },
    size: {
      type: String,
      default: "small",
      required: false,
    },
  },
};
</script>
